%!PS-Adobe-3.0
%%DocumentPaperSizes: Letter
%%LanguageLevel: 2
%%Orientation: Landscape
%%Pages: (atend)
%%DocumentNeededResources: font Helvetica-Bold Courier Courier-Bold Times-Roman
%%EndComments

%%BeginDefaults
%%PageResources: font Helvetica-Bold Courier Courier-Bold Times-Roman
%%EndDefaults

%%BeginSetup
%<Play Setup /$MapUnitOffset 8 /$SpaceChar 32 /$MapUnitScale MapScale>
%<+ /$HeadLength 20 /$MoveRadius 8 /$MapUnitLetterSize 14 /$PageHeight 612>
%<+ /$SwitchToMapMode $FinishReport /$InitModes $InitReports>
%<+ /$ArrowLineThickness 1 /$FinishReports FinishReport /$FinishReport {>
%<+ FinishReport /FinishReport { } def } /$AbsoluteRoundingError .001>
%<+ /$MapNameFontSize 14 /$HalfHeadThickness 5 /$ConvoyRadius 12>
%<+ /$HalfThickness 1 /$InitReports {/FinishReport {} def} /$MapSupplyScale>
%<+ MapScale /$MapNameOffset 14 /$HoldRadius 24 /$MapNameScale MapScale>
%<+ /$FinishModes $FinishReports>

%<Play Definitions>

%<Act Shorthand>
/bd { bind def } bind def
/xd { exch def } bd
/ld { load def } bd
%</Act>

%<Sketch Math>
%$ /ifloor { $AbsoluteRoundingError add floor cvi } bd
/ifloor { .001 add floor cvi } bd
%$ /iceiling { $AbsoluteRoundingError sub ceiling cvi } bd
/iceiling { .001 sub ceiling cvi } bd
/min { 2 copy gt { exch } if pop } bd
/max { 2 copy lt { exch } if pop } bd
/secure_atan { 2 copy 0 eq exch 0 eq and { pop pop 0 } { atan } ifelse } bd
/center { 3 2 roll add 2 div 3 1 roll add 2 div exch } bd
%</Sketch>

%<Act Powers>
/Powers 20 dict def
%</Act>

%<Sketch MapUnitDefinitions>
%%IncludeResource: font Helvetica-Bold
%$ /MapUnitLetterFont /Helvetica-Bold findfont $MapUnitLetterSize scalefont def
/MapUnitLetterFont /Helvetica-Bold findfont 14 scalefont def
%</Sketch>

%<Sketch MapNameDefinitions>
%%IncludeResource: font Helvetica-Bold
%$ /MapNameFont /Helvetica-Bold findfont $MapNameFontSize scalefont def
/MapNameFont /Helvetica-Bold findfont 14 scalefont def
%</Sketch>

%<Sketch TextColumnDefinitions>
%%IncludeResource: font Courier
/TextFixedFont /Courier findfont def
%</Sketch>

%<Sketch TextHeadingDefinitions>
%%IncludeResource: font Courier-Bold
/TextHeadingFont /Courier-Bold findfont def
%</Sketch>

%<Sketch TextTitleDefinitions>
%%IncludeResource: font Times-Roman
/TextTitleFont /Times-Roman findfont def
%</Sketch>

%</Play>

%<Play Chapters /define bd>

%<Chapter PageSetup>
/PageSetup {

%<Sketch TurnLandscape>
	%$ $PageHeight 0 translate
	612 0 translate
	90 rotate
%</Sketch>

%<Sketch SetupGState>
	%$ $InitModes
	/FinishReport { } def
	Black
	OkOrder
%</Sketch>

} bd
%</Chapter>

%<Chapter ShowPage>
/ShowPage {
	%$ $FinishModes
	FinishReport
	showpage

%<Part none/>

} bd
%</Chapter>

%<Chapter VisitColors>
/VisitColors {
	3 dict begin
	/c xd /r xd /g xd

%<Scene GrayColors /operator g /format {name 1}>
	/Black 0 g
	/White .9 g
	/Grey .7 g
	/DarkGrey .5 g
%</Scene>

%<Scene RGBColors /operator r /format {name 3}>
	/Red 1 0 0 r
	/Pink .3 0 0 r
	/Blue 0 0 1 r
	/Mauve 1 0 1 r
	/Yellow 1 1 0 r
	/Orange 1 .5 .3 r
	/Green 0 .7 0 r
	/Brown .6 .45 .2 r
	/Turquoise .2 .7 .7 r
	/LightBlue .4 .6 1 r
	/DarkGreen 0 .4 0 r
	/LightGreen 0 .9 0 r
%</Scene>

%<Scene CMYKColors /operator c /format {name 4}/>

	end
} bd
%</Chapter>

%<Chapter AddPower>
/AddPower {

%<Act AddPower>
	8 dict dup begin 4 1 roll
	load /Contrast xd
	load /PieceColour xd
	/Letter xd
	end
	[ /Power 2 index /def load ] cvx bind
	2 index xd
	Powers 3 1 roll put
%</Act>

} bd
%</Chapter>

%<Chapter VisitPowers>
/VisitPowers {
	1 dict begin
	/p xd

%<Scene Powers /operator p /format {name string name name}>
	/UNOWNED (?) /Brown /White p
%</Scene>

	end
} bd
%</Chapter>

%<Chapter DrawArmy>
/DrawArmy {
	%$ $SwitchToMapMode
	FinishReport /FinishReport { } def
	Power begin
	gsave
	translate

%<Sketch LocateTroop>
	%$ $MapUnitScale dup scale
	MapScale dup scale
	%$ 0 $MapUnitOffset translate
	0 8 translate
%</Sketch>

%<Act PaintArmy>
	3 setlinewidth [] 0 setdash
	newpath
	-20 7 moveto 30 0 rlineto 0 -4 rlineto 4 0 rlineto
	0 -2 rlineto -30 0 rlineto 0 2 rlineto -4 0 rlineto
	0 4 rlineto                                         % barrel
	4 2 moveto 20 -10 rlineto 2 0 rlineto -8 0 rlineto
	-20 10 rlineto                                      % carriage
	Contrast stroke
	0 0 9 0 360 arc                                     % wheel
	closepath
	Contrast stroke
	newpath
	-20 7 moveto 30 0 rlineto 0 -4 rlineto 4 0 rlineto
	0 -2 rlineto -30 0 rlineto 0 2 rlineto -4 0 rlineto
	0 4 rlineto                                         % barrel
	4 2 moveto 20 -10 rlineto 2 0 rlineto -8 0 rlineto
	-20 10 rlineto                                      % carriage
	PieceColour fill
	0 0 9 0 360 arc                                     % wheel
	closepath
	PieceColour fill
%</Act>

%<Act PaintLetter>
	Offset aload pop moveto
	MapUnitLetterFont setfont
	Contrast Letter show
%</Act>

	grestore
	end
} bd
%</Chapter>

%<Chapter DrawFleet>
/DrawFleet {
	%$ $SwitchToMapMode
	FinishReport /FinishReport { } def
	Power begin
	gsave
	translate

%<Sketch LocateTroop>
	%$ $MapUnitScale dup scale
	MapScale dup scale
	%$ 0 $MapUnitOffset translate
	0 8 translate
%</Sketch>

%<Act PaintFleet>
	2 setlinewidth [] 0 setdash
	newpath
	-26 -7 moveto 0 5 rlineto 7 0 rlineto 0 1 rlineto   % to bow
	-3 0 rlineto 0 1 rlineto 7 0 rlineto 0 1 rlineto    % A turret
	-3 0 rlineto 0 1 rlineto 8 0 rlineto 0 -2 rlineto   % B turret
	1 0 rlineto 0 4 rlineto 1 0 rlineto 0 2 rlineto     % conn tower
	2 0 rlineto 0 -1 rlineto 1 0 rlineto 0 4 rlineto    % Infra struct
	2 0 rlineto 0 5 rlineto 1 0 rlineto 0 -5 rlineto    % funnel 1
	2 0 rlineto 0 -4 rlineto 1 0 rlineto 0 3 rlineto    % funnel 2
	2 0 rlineto 0 5 rlineto 1 0 rlineto 0 -5 rlineto    % mast 2
	2 0 rlineto 0 -8 rlineto 2 0 rlineto 0 2 rlineto    % funnel 2
	8 0 rlineto 0 -1 rlineto -3 0 rlineto 0 -1 rlineto  % C turret
	7 0 rlineto 0 -1 rlineto -3 0 rlineto 0 -1 rlineto  % D turret
	6 0 rlineto 0 -1 rlineto 2 0 rlineto 0 -2 rlineto   % stern
	-1 0 rlineto 0 -2 rlineto
	closepath
	gsave Contrast stroke grestore
	PieceColour fill
%</Act>

%<Act PaintLetter>
	Offset aload pop moveto
	MapUnitLetterFont setfont
	Contrast Letter show
%</Act>

	grestore
	end
} bd
%</Chapter>

%<Chapter DrawName>
/DrawName {
	%$ $SwitchToMapMode
	FinishReport /FinishReport { } def
	gsave
	3 1 roll translate

%<Sketch LocateName>
	%$ $MapNameScale dup scale
	MapScale dup scale
	%$ 0 $MapNameOffset neg translate
	0 -14 translate
%</Sketch>

%<Act PaintName>
	MapNameFont setfont
	dup stringwidth pop -2 div 0 neg moveto show
%</Act>

	grestore
} bd
%</Chapter>

%<Chapter supply>
/supply {
	%$ $SwitchToMapMode
	FinishReport /FinishReport { } def
	Power begin
	gsave
	translate

%<Sketch LocateSupply>
	%$ $MapSupplyScale dup scale
	MapScale dup scale
%</Sketch>

%<Act PaintSupply>
	PieceColour
	newpath 0 0 4 0 360 arc fill
%</Act>

	grestore
	end
} bd
%</Chapter>

%<Chapter LocateArrow>
/LocateArrow {

%<Sketch LocateArrow>
	3 index 3 index translate
	3 2 roll sub 3 1 roll exch sub exch
	2 copy dup mul exch dup mul add sqrt 3 1 roll exch secure_atan
	%$ $MapUnitScale dup scale
	MapScale dup scale
	%$ 0 $MapUnitOffset translate
	0 8 translate
	%$ rotate $MapUnitScale div
	rotate MapScale div
%</Sketch>

} bd
%</Chapter>

%<Chapter PaintArrowCircle>
/PaintArrowCircle {

%<Act ArrowCircleBase>
	dup 3 1 roll sub
%</Act>

%<Sketch ShortenArrowTail>
	% if base of arrow is long enough, shorten it
	% e.g. which moves arrow start beyond support circle
	%$ dup $MapUnitLetterSize gt {
	dup 14 gt {
		%$ $MapUnitLetterSize dup 0 translate sub
		14 14 0 translate sub
	} {
		0 translate 0
	} ifelse
%</Sketch>

%<Sketch PaintArrowCircle>
	% draw the circle ...
	%$ $ArrowLineThickness setlinewidth
	1 setlinewidth
	newpath
	2 copy add 0 4 3 roll 0 360 arc
	closepath stroke
	% now the shaft ...
	%$ $HalfThickness 2 mul setlinewidth
	2 setlinewidth
	0 0 moveto
	0 lineto
	stroke
%</Sketch>

} bd
%</Chapter>

%<Chapter ArrowMove>
/ArrowMove {
	%$ $SwitchToMapMode
	FinishReport /FinishReport { } def
	gsave
	LocateArrow

%<Sketch ArrowMoveBase>
	%$ $HeadLength sub
	20 sub
%</Sketch>

%<Sketch ShortenArrowTail>
	% if base of arrow is long enough, shorten it
	% e.g. which moves arrow start beyond support circle
	%$ dup $MapUnitLetterSize gt {
	dup 14 gt {
		%$ $MapUnitLetterSize dup 0 translate sub
		14 14 0 translate sub
	} {
		0 translate 0
	} ifelse
%</Sketch>

%<Sketch ShortenArrowTip>
	% if base is still long enough, shorten it some more
	% which makes arrow head touch support circle
	%$ dup $MapUnitLetterSize gt {
	dup 14 gt {
		%$ $MapUnitLetterSize sub
		14 sub
	} {
		pop 0
	} ifelse
%</Sketch>

%<Sketch PaintArrowMove>
	% draw the arrow head ...
	%$ $ArrowLineThickness setlinewidth
	1 setlinewidth
	newpath
	%$ dup $HalfHeadThickness neg moveto
	dup -5 moveto
	%$ dup $HeadLength add 0 lineto
	dup 20 add 0 lineto
	%$ dup $HalfHeadThickness lineto
	dup 5 lineto
	closepath stroke
	% now the shaft ...
	%$ $HalfThickness 2 mul setlinewidth
	2 setlinewidth
	0 0 moveto
	0 lineto
	stroke
%</Sketch>

	grestore
} bd
%</Chapter>

%<Chapter ArrowRetreat>
/ArrowRetreat {
	%$ $SwitchToMapMode
	FinishReport /FinishReport { } def
	gsave
	LocateArrow

%<Sketch ArrowRetreatBase>
	%$ $HeadLength 2 mul $HalfThickness $HalfHeadThickness div sub sub
	39.8 sub
%</Sketch>

%<Sketch ShortenArrowTail>
	% if base of arrow is long enough, shorten it
	% e.g. which moves arrow start beyond support circle
	%$ dup $MapUnitLetterSize gt {
	dup 14 gt {
		%$ $MapUnitLetterSize dup 0 translate sub
		14 14 0 translate sub
	} {
		0 translate 0
	} ifelse
%</Sketch>

%<Sketch ShortenArrowTip>
	% if base is still long enough, shorten it some more
	% which makes arrow head touch support circle
	%$ dup $MapUnitLetterSize gt {
	dup 14 gt {
		%$ $MapUnitLetterSize sub
		14 sub
	} {
		pop 0
	} ifelse
%</Sketch>

%<Sketch PaintArrowRetreat>
	Red
	% draw the double arrow head ...
	%$ $ArrowLineThickness setlinewidth
	1 setlinewidth
	newpath
	%$ dup $HalfHeadThickness neg moveto
	dup -5 moveto
	%$ dup $HeadLength $HalfThickness $HalfHeadThickness div sub add
	dup 19.8 add
	%$ dup $HalfThickness neg lineto
	dup -1 lineto
	%$ dup $HalfHeadThickness neg lineto
	dup -5 lineto
	%$ dup $HeadLength add 0 lineto
	dup 20 add 0 lineto
	%$ dup $HalfHeadThickness lineto
	dup 5 lineto
	%$ $HalfThickness lineto
	1 lineto
	%$ dup $HalfHeadThickness lineto
	dup 5 lineto
	closepath stroke
	% now the shaft ...
	%$ $HalfThickness 2 mul setlinewidth
	2 setlinewidth
	0 0 moveto
	0 lineto
	stroke
%</Sketch>

	grestore
} bd
%</Chapter>

%<Chapter ArrowHold>
/ArrowHold {
	%$ $SwitchToMapMode
	FinishReport /FinishReport { } def
	gsave
	LocateArrow

%<Sketch HoldRadius>
	%$ $HoldRadius
	24
%</Sketch>

	PaintArrowCircle
	grestore
} bd
%</Chapter>

%<Chapter ArrowSupport>
/ArrowSupport {
	%$ $SwitchToMapMode
	FinishReport /FinishReport { } def
	gsave
	center
	LocateArrow

%<Sketch MoveRadius>
	%$ $MoveRadius
	8
%</Sketch>

	PaintArrowCircle
	grestore
} bd
%</Chapter>

%<Chapter ArrowConvoy>
/ArrowConvoy {
	%$ $SwitchToMapMode
	FinishReport /FinishReport { } def
	gsave
	center
	LocateArrow

%<Sketch ConvoyRadius>
	%$ $ConvoyRadius
	12
%</Sketch>

	PaintArrowCircle
	grestore
} bd
%</Chapter>

%<Chapter OkOrder>
/OkOrder {
	%$ $SwitchToMapMode
	FinishReport /FinishReport { } def

%<Act OkOrder>
	[] 0 setdash
%</Act>

} bd
%</Chapter>

%<Chapter FailedOrder>
/FailedOrder {
	%$ $SwitchToMapMode
	FinishReport /FinishReport { } def

%<Act FailedOrder>
	[4 6] 2 setdash
%</Act>

} bd
%</Chapter>

%<Chapter SplitString>
/SplitString {

%<Sketch SplitString>
	7 dict begin
	/nrChars xd
	/indentString xd
	/objectString xd
	/objectLast objectString length 1 sub def
	% Short string?
	objectLast nrChars lt {
		false objectString
	} {
		% Look for a suitable place to split.
		% First tracking backwards, if that doesn't work, look forward.
		/splitIndex -1 def
		nrChars -1 0 {
			%$ objectString 1 index get $SpaceChar eq {
			objectString 1 index get 32 eq {
				/splitIndex xd exit
			} if pop
		} for splitIndex -1 eq {
			nrChars 1 add 1 objectLast {
				%$ objectString 1 index get $SpaceChar eq {
				objectString 1 index get 32 eq {
					/splitIndex xd exit
				} if pop
			} for
		} if
		splitIndex -1 eq splitIndex objectLast eq or {
			false objectString
		} {
			% The first part.
			objectString 0 splitIndex getinterval
			% The second part.
			objectString splitIndex 1 add objectLast splitIndex sub getinterval
			% Add indentation if needed.
			indentString length 0 gt {
				dup length indentString length add string
				dup 0 indentString putinterval
				dup indentString length 4 3 roll putinterval
			} if
			% Add white space of the first part.
			/nonSpaceIndex objectLast 1 add def
			0 1 objectLast {
				%$ objectString 1 index get $SpaceChar ne {
				objectString 1 index get 32 ne {
					/nonSpaceIndex xd exit
				} if pop
			} for
			nonSpaceIndex 0 gt nonSpaceIndex splitIndex lt and {
				dup length nonSpaceIndex add string
				dup 0 objectString 0 nonSpaceIndex getinterval putinterval
				dup nonSpaceIndex 4 3 roll putinterval
			} if
			exch true exch
		} ifelse
	} ifelse
	end
%</Sketch>

} bd
%</Chapter>

%</Play>

%<Play Installations>

%<Act DefineColors>
{
	currentdict end 3 1 roll [ exch /setgray load ] cvx def begin
}{
	currentdict end 5 1 roll [ 4 1 roll /setrgbcolor load ] cvx def begin
}{
	currentdict end 6 1 roll [ 5 1 roll /setcmykcolor load ] cvx def begin
} bind VisitColors
%</Act>

%<Act DefinePowers>
{ currentdict end 5 1 roll AddPower begin } bind VisitPowers
% Letter offsets
MapUnitLetterFont setfont
Powers {
	begin
	/Offset [ newpath 0 0 moveto Letter true charpath pathbbox
	3 2 roll add -2 div 3 1 roll add -2 div exch ] def
	end pop
} forall
%</Act>

%<Scene Centers /operator ld /format {name name}>
/UNOWNEDCENTER /UNOWNED ld
%</Scene>

%</Play>

%</Play>
%%EndSetup

%%Page: Rum 1
%<Play Page /$GameTitleFontHeight { $GameTitleFontHeightRatio>
%<+ $GameTitleFontSize mul } /$Show show /$ShowMoreText $ShowText>
%<+ /$BoardTitleFontHeight {$BoardTitleFontHeightRatio $BoardTitleFontSize mul}>
%<+ /$ShowTitle $Show /$GameTitleFontBaseX { $GameTitleFontBaseXRatio>
%<+ $GameTitleFontSize mul } /$GameTitleFontBaseY { $GameTitleFontBaseYRatio>
%<+ $GameTitleFontSize mul } /$FixedFontHeightRatio 1 /$HeadingFontBaseXRatio>
%<+ $FontBaseXRatio /$BoardTitleFontHeightRatio $VariableFontHeightRatio>
%<+ /$ShowHeading $Show /$GameTitleFontWidthRatio $VariableFontWidthRatio>
%<+ /$SplitString SplitString /$TextFontWidthRatio $FixedFontWidthRatio>
%<+ /$PageHeight 612 /$BoardTitleFontWidthRatio $VariableFontWidthRatio>
%<+ /$FontBaseYRatio .28 /$GameTitleFontWidth { $GameTitleFontWidthRatio>
%<+ $GameTitleFontSize mul } /$GameTitleFontHeightRatio>
%<+ $VariableFontHeightRatio /$BoardTitleFontBaseX { $BoardTitleFontBaseXRatio>
%<+ $BoardTitleFontSize mul } /$VariableFontWidthRatio .5 /$BoardTitleFontBaseY>
%<+ { $BoardTitleFontBaseYRatio $BoardTitleFontSize mul } /$TextFontHeight {>
%<+ $TextFontHeightRatio $TextFontSize mul } /$GameTitleFontBaseYRatio>
%<+ $FontBaseYRatio /$FixedFontWidthRatio .6 /$SwitchToTextMode $FinishReport>
%<+ /$TextFontBaseYRatio $FontBaseYRatio /$TextFontBaseX { $TextFontBaseXRatio>
%<+ $TextFontSize mul } /$TextFontBaseY {$TextFontBaseYRatio $TextFontSize mul}>
%<+ /$BoardTitleFontBaseYRatio $FontBaseYRatio /$TextFontHeightRatio>
%<+ $FixedFontHeightRatio /$PageWidth 792 /$FinishReport { FinishReport>
%<+ /FinishReport { } def } /$Stringwidth stringwidth /$BoardTitleFontWidth {>
%<+ $BoardTitleFontWidthRatio $BoardTitleFontSize mul } /$FontBaseXRatio 0>
%<+ /$HeadingFontBaseYRatio $FontBaseYRatio /$TextFontWidth {>
%<+ $TextFontWidthRatio $TextFontSize mul } /$GameTitleFontBaseXRatio>
%<+ $FontBaseXRatio /$VariableFontHeightRatio 1 /$ShowText $Show>
%<+ /$TextFontBaseXRatio $FontBaseXRatio /$HeadingFontBaseX {>
%<+ $HeadingFontBaseXRatio $HeadingFontSize mul } /$BoardTitleFontBaseXRatio>
%<+ $FontBaseXRatio /$HeadingFontBaseY { $HeadingFontBaseYRatio>
%<+ $HeadingFontSize mul }>
PageSetup

%<FrameLayout Rum /$GameTitleWidth 153.6 /$SetTextFont { TextFixedFont>
%<+ $TextFontSize# scalefont setfont } /$SetHeadingFont { TextHeadingFont>
%<+ $HeadingFontSize# scalefont setfont } /$OwnerBoxLength 12 /references {>
%<+ ImageFrame { PagePane LeftPane ImageGrid ImageFrame } { Left Bottom Width>
%<+ Height } Image { PagePane LeftPane ImageGrid ImageFrame Image } { Left>
%<+ Bottom Width Height } Owner { PagePane LeftPane MagnetPane Owner } { Left>
%<+ Bottom Width Height LineLength BoxLength InitialWidth InitialHeight }>
%<+ Adjustment { PagePane LeftPane MagnetPane BottomPane Adjustment Adjustment>
%<+ } { Left Bottom Width Height LineLength BoxLength InitialWidth>
%<+ InitialHeight } Retreat { PagePane LeftPane MagnetPane BottomPane Retreat>
%<+ Retreat } { Left Bottom Width Height LineLength BoxLength InitialWidth>
%<+ InitialHeight } Order { PagePane RightPane Order } { Left Bottom Width>
%<+ Height LineLength BoxLength InitialWidth InitialHeight } BoardTitle {>
%<+ PagePane RightPane Title TitleStack Board } { Left Bottom Width Height>
%<+ InitialWidth InitialHeight } GameTitle { PagePane RightPane Title>
%<+ TitleStack Game } { Left Bottom Width Height InitialWidth InitialHeight } }>
%<+ /$GameTitleInitialHeight 16 /$FontSize 8 /$BoardTitle (Diplomacy) /layout>
%<+ PagePane /$ImageFrameBottom 236.0 /$OwnerWidth 590.4 /$OrderWidth 153.6>
%<+ /$GameTitleInitialWidth 24 /$GameTitleFontSize {8 2 mul} /$ImageLeft 22.0>
%<+ /$GameTitleLeft 615.2 /$ImageFrameHeight 352 /$ImageBottom 241.036676218>
%<+ /$RetreatInitialWidth 168.0 /$BoardTitleWidth 153.6 /$RetreatBoxLength 13>
%<+ /$RetreatLeft 312.8 /marginWidth 20 /$RetreatBottom 20.0 /$ImageHeight>
%<+ 341.926647564 /$OwnerInitialHeight 64 /$ImageFrameWidth 590.4>
%<+ /$OrderInitialHeight 464 /$RetreatWidth 297.6 /$RetreatHeight 104>
%<+ /$CellHeight $TextFontHeight /$ImageFrameLeft 20.0>
%<+ /$BoardTitleInitialHeight 24 /height $PageHeight /$OrderInitialWidth 153.6>
%<+ /$OrderLineLength 32 /$OrderLeft 615.2 /$TextFontSize 8 /$GameTitleBottom>
%<+ 548.0 /$RetreatLineLength 62 /$AdjustmentInitialWidth 153.6>
%<+ /$RetreatInitialHeight 64 /$AdjustmentBoxLength 13 /$AdjustmentLeft 20.0>
%<+ /$HeadingFontSize 8 /$AdjustmentBottom 20.0 /$GameTitleHeight 16>
%<+ /$OwnerInitialWidth 566.4 /$OwnerLeft 20.0 /$BoardTitleBottom 564.0>
%<+ /$OrderBoxLength 66 /$AdjustmentWidth 288.0 /$AdjustmentHeight 104>
%<+ /$OwnerBottom 132.0 /$BoardTitleHeight 24 /marginHeight 20 /$OwnerHeight 96>
%<+ /$SetGameTitleFont {TextTitleFont $GameTitleFontSize# scalefont setfont}>
%<+ /$OrderBottom 20.0 /$AdjustmentLineLength 60 /$AdjustmentInitialHeight 56>
%<+ /$ImageWidth 586.4 /$BoardTitleInitialWidth 108 /width $PageWidth>
%<+ /$BoardTitleFontSize {8 3 mul} /$BoardTitleLeft 615.2 /$OrderHeight 528>
%<+ /$OwnerLineLength 123 /$SetBoardTitleFont { TextTitleFont>
%<+ $BoardTitleFontSize# scalefont setfont }>

%<Play DrawBorders /$FirstLine {$TopX# $TopY# moveto} /$TopY { $Bottom $Height>
%<+ add $CellHeight $FontSize sub 2 div sub $FontSize sub $TextFontBaseY add }>
%<+ /$InitWidth $InitialWidth /$InitHeight $InitialHeight /$InitBottom {>
%<+ $Bottom $Height add $InitHeight sub } /$NewLine {$CellHeight# sub moveto}>
%<+ /$TopX {$Left $TextFontBaseX add} /$InitLeft $Left>
gsave
%$ $SetTextFont
TextFixedFont 8 scalefont setfont

%<Play ImageFrame /$Width $ImageFrameWidth /$Height $ImageFrameHeight /$Bottom>
%<+ $ImageFrameBottom /$BorderColor Brown /$Left $ImageFrameLeft>
%$ $BorderColor
Brown

%<Sketch DrawBoxFrameBorder>
%$ $Left# $Bottom# $Width# $Height# rectstroke
20 236 590.4 352 rectstroke
%</Sketch>

%</Play>

%<Play Image /$Width $ImageWidth /$Height $ImageHeight /$Bottom $ImageBottom>
%<+ /$BorderColor Yellow /$Left $ImageLeft>
%$ $BorderColor
Yellow

%<Sketch DrawBoxFrameBorder>
%$ $Left# $Bottom# $Width# $Height# rectstroke
22 241.04 586.4 341.93 rectstroke
%</Sketch>

%</Play>

%<Play Owner /$Width $OwnerWidth /$Height $OwnerHeight /$Bottom $OwnerBottom>
%<+ /$BorderColor Mauve /$InitialWidth $OwnerInitialWidth /$LineLength>
%<+ $OwnerLineLength /$InitialHeight $OwnerInitialHeight /$BoxLength>
%<+ $OwnerBoxLength /$Left $OwnerLeft>
%$ $BorderColor
Mauve

%<Sketch WriteBoxFrameBorder /$Space 32 /$Zero 48 /$Write { currentpoint 3 2>
%<+ roll show $NewLine }>
%$ $FirstLine
20 222.24 moveto
%$ $LineLength string 0 1 $LineLength 1 sub {
123 string 0 1 122 {
	%$ 1 index exch dup 1 add 10 mod $Zero add put
	1 index exch dup 1 add 10 mod 48 add put
	%$ } for dup $Write
} for dup currentpoint 3 2 roll show 8 sub moveto
%$ 1 1 $LineLength 2 sub {
1 1 121 {
	%$ 1 index exch $Space put
	1 index exch 32 put
} for
%$ 1 1 $BoxLength 2 sub {
1 1 10 {
	%$ 1 index 0 2 index 1 add 10 mod $Zero add put
	1 index 0 2 index 1 add 10 mod 48 add put
	%$ 1 index $LineLength 1 sub 3 2 roll $LineLength add 10 mod $Zero add put
	1 index 122 3 2 roll 123 add 10 mod 48 add put
	%$ dup $Write
	dup currentpoint 3 2 roll show 8 sub moveto
} for
%$ 0 1 $LineLength 1 sub {
0 1 122 {
	%$ 1 index exch dup $BoxLength add 10 mod $Zero add put
	1 index exch dup 12 add 10 mod 48 add put
	%$ } for $Write
} for currentpoint 3 2 roll show 8 sub moveto
%</Sketch>

%<Sketch DrawInitialBoxFrameBorder>
[ 4 6 ] 2 setdash
%$ $InitLeft# $InitBottom# $InitWidth# $InitHeight# rectstroke
20 164 566.4 64 rectstroke
[ ] 0 setdash
%</Sketch>

%<Sketch DrawBoxFrameBorder>
%$ $Left# $Bottom# $Width# $Height# rectstroke
20 132 590.4 96 rectstroke
%</Sketch>

%</Play>

%<Play Adjustment /$Width $AdjustmentWidth /$Height $AdjustmentHeight /$Bottom>
%<+ $AdjustmentBottom /$BorderColor Red /$InitialWidth $AdjustmentInitialWidth>
%<+ /$LineLength $AdjustmentLineLength /$InitialHeight $AdjustmentInitialHeight>
%<+ /$BoxLength $AdjustmentBoxLength /$Left $AdjustmentLeft>
%$ $BorderColor
Red

%<Sketch WriteBoxFrameBorder /$Space 32 /$Zero 48 /$Write { currentpoint 3 2>
%<+ roll show $NewLine }>
%$ $FirstLine
20 118.24 moveto
%$ $LineLength string 0 1 $LineLength 1 sub {
60 string 0 1 59 {
	%$ 1 index exch dup 1 add 10 mod $Zero add put
	1 index exch dup 1 add 10 mod 48 add put
	%$ } for dup $Write
} for dup currentpoint 3 2 roll show 8 sub moveto
%$ 1 1 $LineLength 2 sub {
1 1 58 {
	%$ 1 index exch $Space put
	1 index exch 32 put
} for
%$ 1 1 $BoxLength 2 sub {
1 1 11 {
	%$ 1 index 0 2 index 1 add 10 mod $Zero add put
	1 index 0 2 index 1 add 10 mod 48 add put
	%$ 1 index $LineLength 1 sub 3 2 roll $LineLength add 10 mod $Zero add put
	1 index 59 3 2 roll 60 add 10 mod 48 add put
	%$ dup $Write
	dup currentpoint 3 2 roll show 8 sub moveto
} for
%$ 0 1 $LineLength 1 sub {
0 1 59 {
	%$ 1 index exch dup $BoxLength add 10 mod $Zero add put
	1 index exch dup 13 add 10 mod 48 add put
	%$ } for $Write
} for currentpoint 3 2 roll show 8 sub moveto
%</Sketch>

%<Sketch DrawInitialBoxFrameBorder>
[ 4 6 ] 2 setdash
%$ $InitLeft# $InitBottom# $InitWidth# $InitHeight# rectstroke
20 68 153.6 56 rectstroke
[ ] 0 setdash
%</Sketch>

%<Sketch DrawBoxFrameBorder>
%$ $Left# $Bottom# $Width# $Height# rectstroke
20 20 288 104 rectstroke
%</Sketch>

%</Play>

%<Play Retreat /$Width $RetreatWidth /$Height $RetreatHeight /$Bottom>
%<+ $RetreatBottom /$BorderColor Green /$InitialWidth $RetreatInitialWidth>
%<+ /$LineLength $RetreatLineLength /$InitialHeight $RetreatInitialHeight>
%<+ /$BoxLength $RetreatBoxLength /$Left $RetreatLeft>
%$ $BorderColor
Green

%<Sketch WriteBoxFrameBorder /$Space 32 /$Zero 48 /$Write { currentpoint 3 2>
%<+ roll show $NewLine }>
%$ $FirstLine
312.8 118.24 moveto
%$ $LineLength string 0 1 $LineLength 1 sub {
62 string 0 1 61 {
	%$ 1 index exch dup 1 add 10 mod $Zero add put
	1 index exch dup 1 add 10 mod 48 add put
	%$ } for dup $Write
} for dup currentpoint 3 2 roll show 8 sub moveto
%$ 1 1 $LineLength 2 sub {
1 1 60 {
	%$ 1 index exch $Space put
	1 index exch 32 put
} for
%$ 1 1 $BoxLength 2 sub {
1 1 11 {
	%$ 1 index 0 2 index 1 add 10 mod $Zero add put
	1 index 0 2 index 1 add 10 mod 48 add put
	%$ 1 index $LineLength 1 sub 3 2 roll $LineLength add 10 mod $Zero add put
	1 index 61 3 2 roll 62 add 10 mod 48 add put
	%$ dup $Write
	dup currentpoint 3 2 roll show 8 sub moveto
} for
%$ 0 1 $LineLength 1 sub {
0 1 61 {
	%$ 1 index exch dup $BoxLength add 10 mod $Zero add put
	1 index exch dup 13 add 10 mod 48 add put
	%$ } for $Write
} for currentpoint 3 2 roll show 8 sub moveto
%</Sketch>

%<Sketch DrawInitialBoxFrameBorder>
[ 4 6 ] 2 setdash
%$ $InitLeft# $InitBottom# $InitWidth# $InitHeight# rectstroke
312.8 60 168 64 rectstroke
[ ] 0 setdash
%</Sketch>

%<Sketch DrawBoxFrameBorder>
%$ $Left# $Bottom# $Width# $Height# rectstroke
312.8 20 297.6 104 rectstroke
%</Sketch>

%</Play>

%<Play Order /$Width $OrderWidth /$Height $OrderHeight /$Bottom $OrderBottom>
%<+ /$BorderColor Orange /$InitialWidth $OrderInitialWidth /$LineLength>
%<+ $OrderLineLength /$InitialHeight $OrderInitialHeight /$BoxLength>
%<+ $OrderBoxLength /$Left $OrderLeft>
%$ $BorderColor
Orange

%<Sketch WriteBoxFrameBorder /$Space 32 /$Zero 48 /$Write { currentpoint 3 2>
%<+ roll show $NewLine }>
%$ $FirstLine
615.2 542.24 moveto
%$ $LineLength string 0 1 $LineLength 1 sub {
32 string 0 1 31 {
	%$ 1 index exch dup 1 add 10 mod $Zero add put
	1 index exch dup 1 add 10 mod 48 add put
	%$ } for dup $Write
} for dup currentpoint 3 2 roll show 8 sub moveto
%$ 1 1 $LineLength 2 sub {
1 1 30 {
	%$ 1 index exch $Space put
	1 index exch 32 put
} for
%$ 1 1 $BoxLength 2 sub {
1 1 64 {
	%$ 1 index 0 2 index 1 add 10 mod $Zero add put
	1 index 0 2 index 1 add 10 mod 48 add put
	%$ 1 index $LineLength 1 sub 3 2 roll $LineLength add 10 mod $Zero add put
	1 index 31 3 2 roll 32 add 10 mod 48 add put
	%$ dup $Write
	dup currentpoint 3 2 roll show 8 sub moveto
} for
%$ 0 1 $LineLength 1 sub {
0 1 31 {
	%$ 1 index exch dup $BoxLength add 10 mod $Zero add put
	1 index exch dup 66 add 10 mod 48 add put
	%$ } for $Write
} for currentpoint 3 2 roll show 8 sub moveto
%</Sketch>

%<Sketch DrawInitialBoxFrameBorder>
[ 4 6 ] 2 setdash
%$ $InitLeft# $InitBottom# $InitWidth# $InitHeight# rectstroke
615.2 84 153.6 464 rectstroke
[ ] 0 setdash
%</Sketch>

%<Sketch DrawBoxFrameBorder>
%$ $Left# $Bottom# $Width# $Height# rectstroke
615.2 20 153.6 528 rectstroke
%</Sketch>

%</Play>

%<Play BoardTitle /$Width $BoardTitleWidth /$Height $BoardTitleHeight /$Bottom>
%<+ $BoardTitleBottom /$BorderColor LightBlue /$InitialWidth>
%<+ $BoardTitleInitialWidth /$InitialHeight $BoardTitleInitialHeight /$Left>
%<+ $BoardTitleLeft>
%$ $BorderColor
LightBlue

%<Sketch DrawInitialBoxFrameBorder>
[ 4 6 ] 2 setdash
%$ $InitLeft# $InitBottom# $InitWidth# $InitHeight# rectstroke
615.2 564 108 24 rectstroke
[ ] 0 setdash
%</Sketch>

%<Sketch DrawBoxFrameBorder>
%$ $Left# $Bottom# $Width# $Height# rectstroke
615.2 564 153.6 24 rectstroke
%</Sketch>

%</Play>

%<Play GameTitle /$Width $GameTitleWidth /$Height $GameTitleHeight /$Bottom>
%<+ $GameTitleBottom /$BorderColor LightBlue /$InitialWidth>
%<+ $GameTitleInitialWidth /$InitialHeight $GameTitleInitialHeight /$Left>
%<+ $GameTitleLeft>
%$ $BorderColor
LightBlue

%<Sketch DrawInitialBoxFrameBorder>
[ 4 6 ] 2 setdash
%$ $InitLeft# $InitBottom# $InitWidth# $InitHeight# rectstroke
615.2 548 24 16 rectstroke
[ ] 0 setdash
%</Sketch>

%<Sketch DrawBoxFrameBorder>
%$ $Left# $Bottom# $Width# $Height# rectstroke
615.2 548 153.6 16 rectstroke
%</Sketch>

%</Play>

grestore
%</Play>

%<HorizontalStackLayout PagePane /gapWidth {$TextFontWidth 1 mul} /layouts {>
%<+ LeftPane RightPane }>

%<VerticalStackLayout LeftPane /gapHeight {$TextFontHeight 1 mul} /layouts {>
%<+ MagnetPane ImageGrid } /bottomToTop true>

%<VerticalStackLayout MagnetPane /layouts {BottomPane Owner} /fillAlgorithm>
%<+ equalFill /bottomToTop true>

%<HorizontalStackLayout BottomPane /layouts {Adjustment Retreat} /fillAlgorithm>
%<+ equalFill /gapWidth {$TextFontWidth 1 mul}>

%<FrameLayout Adjustment /$HeadingX {$Left $HeadingFontBaseX add} /$HeadingY {>
%<+ $Bottom $Height add $HeadingFontBaseY add } /$HeadingName (Adjustments)>
%<+ /width {11 $TextFontWidth mul} /topMarginHeight $TextFontHeight /layout>
%<+ Adjustment>

%<GridLayout Adjustment /cellWidth $TextFontWidth /$Bottom 20.0 /widthPriority>
%<+ 4 /boxLength 7 /$StopY {$Bottom $TextFontBaseY add} /$Height 104>
%<+ /$BoxLength 13 /cellHeight $TextFontHeight /lineLength 32 /$StartX { $Left>
%<+ $TextFontBaseX add } /$StartY {$Bottom $Height add $TextFontBaseY add}>
%<+ /heightPriority 3 /$CellHeight 8 /$LineLength 60 /$Left 20.0>

%<Chapter Adjustment /type dict /define def>
/Adjustment <<

%<Chapter Steps /type array /define {}>
	/Steps [

%<Sketch TextLastColumnSteps>
		%$ { /Count 0 def /Y $StartY# def false true } bind
		{ /Count 0 def /Y 126.24 def false true } bind
		{
			%$ Count $BoxLength 1 sub ge { false true } {
			Count 12 ge { false true } {
				%$ $LineLength $SplitString
				60 SplitString
				%$ /Count Count 1 add def /Y Y $CellHeight# sub def
				/Count Count 1 add def /Y Y 8 sub def
				%$ $StartX# Y moveto $ShowText
				20 Y moveto show
				true false
			} ifelse
		} bind
		{
			%$ $LineLength $SplitString [ exch {
			60 SplitString [ exch {
				%$ $StartX# $StopY# moveto $ShowText
				20 22.24 moveto show
			} /exec load ] cvx /Finish xd
			true true
		} bind
		{
			/Count 1 def /Finish {
				%$ $StartX# $StopY# moveto (... \() $ShowMoreText
				20 22.24 moveto (... \() show
				%$ Count dup 1 add log iceiling string cvs $ShowMoreText
				Count dup 1 add log iceiling string cvs show
				%$ ( more\)) $ShowMoreText
				( more\)) show
			} bd false true
		} bind
		%$ { /Count Count 1 add def $LineLength $SplitString pop true false } bind
		{ /Count Count 1 add def 60 SplitString pop true false } bind
%</Sketch>

	]
%</Chapter>

%<Chapter Start /type proc /define bind>
	/Start {
		%$ $SetHeadingFont
		TextHeadingFont 8 scalefont setfont
		%$ $HeadingX# $HeadingY# moveto
		20 126.24 moveto
		%$ $HeadingName $ShowHeading
		(Adjustments) show
		%$ $SetTextFont
		TextFixedFont 8 scalefont setfont
		/StepIndex 0 def
		/Step Steps 0 get def
		/Finish { } def

%<Part none/>

	} bind
%</Chapter>

%<Chapter Write /type proc /define bind>
	/Write {

%<Sketch IterateSplitString>
		(  ) {
			Step {
				/StepIndex StepIndex 1 add def
				/Step Steps StepIndex get def
			} if { not { exit } if () } if
		} loop
%</Sketch>

	} bind
%</Chapter>

>> def
%</Chapter>

%</GridLayout>

%<Chapter AdjustReport>
/AdjustReport {
	%$ $SwitchToTextMode
	FinishReport /FinishReport { } def
	Adjustment begin Start end
	/FinishReport /FinishAdjustReport load def

%<Part none/>

} def
%</Chapter>

%<Chapter WriteAdjust>
/WriteAdjust {
	Adjustment begin Write end

%<Part none/>

} def
%</Chapter>

%<Chapter FinishAdjustReport>
/FinishAdjustReport {
	Adjustment begin Finish end

%<Part none/>

} def
%</Chapter>

%</FrameLayout>

%<FrameLayout Retreat /$HeadingX {$Left $HeadingFontBaseX add} /$HeadingY {>
%<+ $Bottom $Height add $HeadingFontBaseY add } /$HeadingName (Retreats) /width>
%<+ { 8 $TextFontWidth mul } /topMarginHeight $TextFontHeight /layout Retreat>

%<GridLayout Retreat /cellWidth $TextFontWidth /$Bottom 20.0 /widthPriority 1>
%<+ /boxLength 8 /$StopY {$Bottom $TextFontBaseY add} /$Height 104 /$BoxLength>
%<+ 13 /cellHeight $TextFontHeight /lineLength 35 /$StartX { $Left>
%<+ $TextFontBaseX add } /$StartY {$Bottom $Height add $TextFontBaseY add}>
%<+ /heightPriority 4 /$CellHeight 8 /$LineLength 62 /$Left 312.8>

%<Chapter Retreat /type dict /define def>
/Retreat <<

%<Chapter Steps /type array /define {}>
	/Steps [

%<Sketch TextLastColumnSteps>
		%$ { /Count 0 def /Y $StartY# def false true } bind
		{ /Count 0 def /Y 126.24 def false true } bind
		{
			%$ Count $BoxLength 1 sub ge { false true } {
			Count 12 ge { false true } {
				%$ $LineLength $SplitString
				62 SplitString
				%$ /Count Count 1 add def /Y Y $CellHeight# sub def
				/Count Count 1 add def /Y Y 8 sub def
				%$ $StartX# Y moveto $ShowText
				312.8 Y moveto show
				true false
			} ifelse
		} bind
		{
			%$ $LineLength $SplitString [ exch {
			62 SplitString [ exch {
				%$ $StartX# $StopY# moveto $ShowText
				312.8 22.24 moveto show
			} /exec load ] cvx /Finish xd
			true true
		} bind
		{
			/Count 1 def /Finish {
				%$ $StartX# $StopY# moveto (... \() $ShowMoreText
				312.8 22.24 moveto (... \() show
				%$ Count dup 1 add log iceiling string cvs $ShowMoreText
				Count dup 1 add log iceiling string cvs show
				%$ ( more\)) $ShowMoreText
				( more\)) show
			} bd false true
		} bind
		%$ { /Count Count 1 add def $LineLength $SplitString pop true false } bind
		{ /Count Count 1 add def 62 SplitString pop true false } bind
%</Sketch>

	]
%</Chapter>

%<Chapter Start /type proc /define bind>
	/Start {
		%$ $SetHeadingFont
		TextHeadingFont 8 scalefont setfont
		%$ $HeadingX# $HeadingY# moveto
		312.8 126.24 moveto
		%$ $HeadingName $ShowHeading
		(Retreats) show
		%$ $SetTextFont
		TextFixedFont 8 scalefont setfont
		/StepIndex 0 def
		/Step Steps 0 get def
		/Finish { } def

%<Part none/>

	} bind
%</Chapter>

%<Chapter Write /type proc /define bind>
	/Write {

%<Sketch IterateSplitString>
		(  ) {
			Step {
				/StepIndex StepIndex 1 add def
				/Step Steps StepIndex get def
			} if { not { exit } if () } if
		} loop
%</Sketch>

	} bind
%</Chapter>

>> def
%</Chapter>

%</GridLayout>

%<Chapter RetreatReport>
/RetreatReport {
	%$ $SwitchToTextMode
	FinishReport /FinishReport { } def
	Retreat begin Start end
	/FinishReport /FinishRetreatReport load def

%<Part none/>

} def
%</Chapter>

%<Chapter WriteRetreat>
/WriteRetreat {
	Retreat begin Write end

%<Part none/>

} def
%</Chapter>

%<Chapter FinishRetreatReport>
/FinishRetreatReport {
	Retreat begin Finish end

%<Part none/>

} def
%</Chapter>

%</FrameLayout>

%</HorizontalStackLayout>

%<GridLayout Owner /cellWidth $TextFontWidth /$Bottom 132.0 /widthPriority 3>
%<+ /boxLength 8 /$StopY {$Bottom $TextFontBaseY add} /$Height 96 /$BoxLength>
%<+ 12 /cellHeight $TextFontHeight /lineLength 118 /$StartX { $Left>
%<+ $TextFontBaseX add } /$StartY {$Bottom $Height add $TextFontBaseY add}>
%<+ /heightPriority 2 /$CellHeight 8 /$LineLength 123 /$Left 20.0>

%<Chapter Owner /type dict /define def>
/Owner <<

%<Chapter Steps /type array /define {}>
	/Steps [

%<Sketch TextLastColumnSteps>
		%$ { /Count 0 def /Y $StartY# def false true } bind
		{ /Count 0 def /Y 230.24 def false true } bind
		{
			%$ Count $BoxLength 1 sub ge { false true } {
			Count 11 ge { false true } {
				%$ $LineLength $SplitString
				123 SplitString
				%$ /Count Count 1 add def /Y Y $CellHeight# sub def
				/Count Count 1 add def /Y Y 8 sub def
				%$ $StartX# Y moveto $ShowText
				20 Y moveto show
				true false
			} ifelse
		} bind
		{
			%$ $LineLength $SplitString [ exch {
			123 SplitString [ exch {
				%$ $StartX# $StopY# moveto $ShowText
				20 134.24 moveto show
			} /exec load ] cvx /Finish xd
			true true
		} bind
		{
			/Count 1 def /Finish {
				%$ $StartX# $StopY# moveto (... \() $ShowMoreText
				20 134.24 moveto (... \() show
				%$ Count dup 1 add log iceiling string cvs $ShowMoreText
				Count dup 1 add log iceiling string cvs show
				%$ ( more\)) $ShowMoreText
				( more\)) show
			} bd false true
		} bind
		%$ { /Count Count 1 add def $LineLength $SplitString pop true false } bind
		{ /Count Count 1 add def 123 SplitString pop true false } bind
%</Sketch>

	]
%</Chapter>

%<Chapter Start /type proc /define bind>
	/Start {
		%$ $SetTextFont
		TextFixedFont 8 scalefont setfont
		/StepIndex 0 def
		/Step Steps 0 get def
		/Finish { } def

%<Part none/>

	} bind
%</Chapter>

%<Chapter Write /type proc /define bind>
	/Write {

%<Sketch IterateSplitString>
		(  ) {
			Step {
				/StepIndex StepIndex 1 add def
				/Step Steps StepIndex get def
			} if { not { exit } if () } if
		} loop
%</Sketch>

	} bind
%</Chapter>

>> def
%</Chapter>

%<Chapter OwnerReport>
/OwnerReport {
	%$ $SwitchToTextMode
	FinishReport /FinishReport { } def
	Owner begin Start end
	/FinishReport /FinishOwnerReport load def

%<Part none/>

} def
%</Chapter>

%<Chapter WriteOwner>
/WriteOwner {
	Owner begin Write end

%<Part none/>

} def
%</Chapter>

%<Chapter FinishOwnerReport>
/FinishOwnerReport {
	Owner begin Finish end

%<Part none/>

} def
%</Chapter>

%</GridLayout>

%</VerticalStackLayout>

%<GridLayout ImageGrid /cellWidth $TextFontWidth /cellHeight $TextFontHeight>
%<+ /fitWidth 2 /fitHeight 2 /layout ImageFrame>

%<FrameLayout ImageFrame /marginWidth 2 /fitWidth 2 /fitHeight 2 /layout Image>
%<+ /marginHeight 2>

%<ImageLayout Image /$Bottom 241.036676218 /widthPriority 5 /$fx { $Left $Width>
%<+ 2 div add } /imageWidth 698 /$fy {$Bottom $Height 3 div add} /imageHeight>
%<+ 407 /$ax $fx /$Height 341.926647564 /$ay {$fy $Height 3 div add} /$ay2 {>
%<+ $fy $ay add 2 div } /heightPriority 5 /$Width 586.4 /$ImageScale>
%<+ 0.840114613181 /$Left 22.0 /$ax2 {$fx $ax add 2 div $Width 4 div sub}>
%$ /MapScale $ImageScale#4 def
/MapScale 0.8401 def
Black
UNOWNED
%$ $fx# $fy# DrawFleet
315.2 355.01 DrawFleet
%$ $fx# $fy# (FLEET) DrawName
315.2 355.01 (FLEET) DrawName
%$ $ax# $ay# DrawArmy
315.2 468.99 DrawArmy
%$ $ax# $ay# (ARMY) DrawName
315.2 468.99 (ARMY) DrawName
%$ $ax2# $ay2# DrawArmy
168.6 412 DrawArmy
%$ $ax2# $ay2# (A 2) DrawName
168.6 412 (A 2) DrawName
%$ $ax2# $ay2# $fx# $fy# ArrowMove
168.6 412 315.2 355.01 ArrowMove
%$ $ax# $ay# $ax2# $ay2# $fx# $fy# ArrowSupport
315.2 468.99 168.6 412 315.2 355.01 ArrowSupport
%$ FailedOrder $fx# $fy# $ax# $ay# ArrowHold OkOrder
FailedOrder 315.2 355.01 315.2 468.99 ArrowHold OkOrder
%$ $fx# $fy# $fx# 2 mul $ax2# sub $fy# 2 mul $ay2# sub ArrowRetreat
315.2 355.01 461.8 298.02 ArrowRetreat
%$ FailedOrder $fx# $fy# $ax# $ay# $ax2# $ay2# ArrowConvoy OkOrder
FailedOrder 315.2 355.01 315.2 468.99 168.6 412 ArrowConvoy OkOrder
%$ FailedOrder $ax# $ay# $ax2# $ay2# ArrowMove OkOrder
FailedOrder 315.2 468.99 168.6 412 ArrowMove OkOrder
%$ FailedOrder $ax2# $ay2# $ax2# $fy# 2 mul $ay2# sub ArrowRetreat OkOrder
FailedOrder 168.6 412 168.6 298.02 ArrowRetreat OkOrder
UNOWNEDCENTER
%$ $ax2# $ay2# $ax2# $fy# 2 mul $ay2# sub supply
168.6 412 168.6 298.02 supply
%</ImageLayout>

%</FrameLayout>

%</GridLayout>

%</VerticalStackLayout>

%<VerticalStackLayout RightPane /layouts {Order Title} /bottomToTop true>

%<GridLayout Order /cellWidth $TextFontWidth /$Bottom 20.0 /widthPriority 2>
%<+ /boxLength 58 /$StopY {$Bottom $TextFontBaseY add} /$Height 528 /$BoxLength>
%<+ 66 /cellHeight $TextFontHeight /lineLength 32 /$StartX { $Left>
%<+ $TextFontBaseX add } /$StartY {$Bottom $Height add $TextFontBaseY add}>
%<+ /heightPriority 1 /$CellHeight 8 /$LineLength 32 /$Left 615.2>

%<Chapter Order /type dict /define def>
/Order <<

%<Chapter Steps /type array /define {}>
	/Steps [

%<Sketch TextLastColumnSteps>
		%$ { /Count 0 def /Y $StartY# def false true } bind
		{ /Count 0 def /Y 550.24 def false true } bind
		{
			%$ Count $BoxLength 1 sub ge { false true } {
			Count 65 ge { false true } {
				%$ $LineLength $SplitString
				32 SplitString
				%$ /Count Count 1 add def /Y Y $CellHeight# sub def
				/Count Count 1 add def /Y Y 8 sub def
				%$ $StartX# Y moveto $ShowText
				615.2 Y moveto show
				true false
			} ifelse
		} bind
		{
			%$ $LineLength $SplitString [ exch {
			32 SplitString [ exch {
				%$ $StartX# $StopY# moveto $ShowText
				615.2 22.24 moveto show
			} /exec load ] cvx /Finish xd
			true true
		} bind
		{
			/Count 1 def /Finish {
				%$ $StartX# $StopY# moveto (... \() $ShowMoreText
				615.2 22.24 moveto (... \() show
				%$ Count dup 1 add log iceiling string cvs $ShowMoreText
				Count dup 1 add log iceiling string cvs show
				%$ ( more\)) $ShowMoreText
				( more\)) show
			} bd false true
		} bind
		%$ { /Count Count 1 add def $LineLength $SplitString pop true false } bind
		{ /Count Count 1 add def 32 SplitString pop true false } bind
%</Sketch>

	]
%</Chapter>

%<Chapter Start /type proc /define bind>
	/Start {
		%$ $SetTextFont
		TextFixedFont 8 scalefont setfont
		/StepIndex 0 def
		/Step Steps 0 get def
		/Finish { } def

%<Part none/>

	} bind
%</Chapter>

%<Chapter Write /type proc /define bind>
	/Write {

%<Sketch IterateSplitString>
		(  ) {
			Step {
				/StepIndex StepIndex 1 add def
				/Step Steps StepIndex get def
			} if { not { exit } if () } if
		} loop
%</Sketch>

	} bind
%</Chapter>

>> def
%</Chapter>

%<Chapter OrderReport>
/OrderReport {
	%$ $SwitchToTextMode
	FinishReport /FinishReport { } def
	Order begin Start end
	/FinishReport /FinishOrderReport load def

%<Part none/>

} def
%</Chapter>

%<Chapter WriteOrder>
/WriteOrder {
	Order begin Write end

%<Part none/>

} def
%</Chapter>

%<Chapter FinishOrderReport>
/FinishOrderReport {
	Order begin Finish end

%<Part none/>

} def
%</Chapter>

%</GridLayout>

%<GridLayout Title /$GameTitleWidth 153.6 /cellWidth $TextFontWidth>
%<+ /$GameTitleLeft 615.2 /$GameTitleBottom 548.0 /$BoardTitleLeft 615.2>
%<+ /cellHeight $TextFontHeight /references { BoardTitle { TitleStack Board } {>
%<+ Left Bottom Width Height } GameTitle { TitleStack Game } { Left Bottom>
%<+ Width Height } } /$BoardTitleBottom 564.0 /layout TitleStack>

%<Chapter DrawTitle>
/DrawTitle {
	%$ $SwitchToTextMode
	FinishReport /FinishReport { } def

%<Play WriteBoardTitle /$BaseY $BoardTitleFontBaseY /$Bottom $BoardTitleBottom>
%<+ /$BaseX $BoardTitleFontBaseX /$Left $BoardTitleLeft>
	%$ $SetBoardTitleFont
	TextTitleFont 24 scalefont setfont
	%$ $BoardTitle
	(Diplomacy)

%<Sketch WriteTitle>
	%$ $Left# $BaseX# add $Bottom# $BaseY# add moveto $ShowTitle
	615.2 570.72 moveto show
%</Sketch>

%</Play>

%<Play WriteGameTitle /$BaseY $GameTitleFontBaseY /$Width $GameTitleWidth>
%<+ /$Bottom $GameTitleBottom /$BaseX $GameTitleFontBaseX /$Left $GameTitleLeft>
	%$ $SetGameTitleFont
	TextTitleFont 16 scalefont setfont

%<Sketch FitTitle>
	%$ dup $Stringwidth pop dup $Width gt {
	dup stringwidth pop dup 153.6 gt {
		%$ $Left# $Bottom# moveto
		615.2 548 moveto
		%$ $Width exch div dup 1 scale exch
		153.6 exch div dup 1 scale exch
		%$ $BaseX# $BaseY# rmoveto $ShowTitle
		0 4.48 rmoveto show
		1 exch div 1 scale
	} {
		%$ pop $Left# $BaseX# add $Bottom# $BaseY# add moveto $ShowTitle
		pop 615.2 552.48 moveto show
	} ifelse
%</Sketch>

%</Play>

} def
%</Chapter>

%<VerticalStackLayout TitleStack /layouts {Board Game}>

%<Layout Board /limitHeight 1 /width {$BoardTitleFontWidth 9 mul} /height>
%<+ $BoardTitleFontHeight>
%</Layout>

%<Layout Game /limitHeight 1 /width {$GameTitleFontWidth 3 mul} /height>
%<+ $GameTitleFontHeight>
%</Layout>

%</VerticalStackLayout>

%</GridLayout>

%</VerticalStackLayout>

%</HorizontalStackLayout>

%</FrameLayout>

(nutmeg, Fall of 1668) DrawTitle
OrderReport
(ENGLAND) WriteOrder
( F TAN - ZAN           ) WriteOrder
( F MOZ - CAP           BOUNCE) WriteOrder
( F SWP H               ) WriteOrder
( F MWP - SOL           ) WriteOrder
( F NWP - ECS           BOUNCE) WriteOrder
( F BOB - NIC           BOUNCE) WriteOrder
( F MZC - CGH           BOUNCE) WriteOrder
( F YAK - GOC           ) WriteOrder
( F ZEE - TAS           ) WriteOrder
( F GAN - COR           ) WriteOrder
( F MEN - MIO           ) WriteOrder
( F NIO - GCA           BOUNCE) WriteOrder
( F SEY S TAN - ZAN     ) WriteOrder
( F MOL - ECS           BOUNCE) WriteOrder
( F TEH S YAK - GOC     ) WriteOrder
( F SRI - AND           ) WriteOrder
( F COR - CAC           ) WriteOrder
( F BOB - NIC           BOUNCE) WriteOrder
( A BEN S PON - AGR     ) WriteOrder
( A PON - AGR           ) WriteOrder
(GERMANY) WriteOrder
( F MLC - GCA           BOUNCE) WriteOrder
( F GUI - SEN           ) WriteOrder
( A CAL - ORL           ) WriteOrder
( A GUA H               ) WriteOrder
( F GUB - PER           ) WriteOrder
( F CAT - GOA           ) WriteOrder
( F MWP - SWP           ) WriteOrder
( A CHI S BAH - PAR     ) WriteOrder
( A AGR - BOM           ) WriteOrder
( F RIO - BAH           ) WriteOrder
( F PAG - MDF           ) WriteOrder
( F NIC - BOB           ) WriteOrder
( F CAC - CAT           ) WriteOrder
( A TUK - DAH           BOUNCE) WriteOrder
( F GME S CUB           CUT) WriteOrder
( F CUB S GME           DISLODGED) WriteOrder
( F GOC - CAL/WC        DISLODGED) WriteOrder
( F ORE - CAL/WC        BOUNCE) WriteOrder
(SPAIN) WriteOrder
( F DAH S BBE - GOL     CUT) WriteOrder
( F BBE - GOL           BOUNCE) WriteOrder
( F CVE - GUI           ) WriteOrder
( F CGH - CAP           BOUNCE) WriteOrder
( F ZAN H               DISLODGED) WriteOrder
(HOLLAND) WriteOrder
( A GOL S GUI           VOID) WriteOrder
( F ALE - PLA           ) WriteOrder
(PORTUGAL) WriteOrder
( F CAB S CAY - CUB     ) WriteOrder
( A BAH - PAR           ) WriteOrder
( A CHA - PAR           BOUNCE) WriteOrder
( F QUI - GUB           ) WriteOrder
( F CAY - CUB           ) WriteOrder
( F CAR - GME           BOUNCE) WriteOrder
RetreatReport
(GERMANY   F GOC - MEX/WC) WriteRetreat
(SPAIN     F ZAN - ABY) WriteRetreat
AdjustReport
(ENGLAND    BUILDS  A ACH, F MAL) WriteAdjust
(SPAIN      REMOVES F BBE) WriteAdjust
OwnerReport
(ENGLAND   (22/22) ACH AGR AMB BAN BAT BEI CAN CER EDO KNG MAC MAL NAG PAT PHI RUM SHA SRI TER VIC ZAN ZEE) WriteOwner
(GERMANY   (17/17) BAH BOM CAL CAT GOA GUA LOU MAN MEX ORE ORL PER QUE RIO SAM SEN SUR) WriteOwner
(HOLLAND   (2/2)   GOL PLA) WriteOwner
(PORTUGAL  (6/6)   CHA CUB CUZ HIS MAR PAR) WriteOwner
(SPAIN     (4/4)   ADE BUG CAP DAH) WriteOwner
ShowPage
%</Play>

%%Trailer
%%Pages: 1
